﻿#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Omu.Awesome.Core;
using XPressify.Data;

#endregion

namespace XPressify.Models
{
    public class PageModel
    {
        public Guid SubjectId { get; set; }
        public Page Page { get; set; }
        public bool IsAdmin { get; set; }
        public bool IsMemeber { get; set; }
        public User Administrator { get; set; }
    }

    public class PageModelDetails
    {
        [Display(Name = "Id")]
        public Guid Id { get; set; }

        [Display(Name = "Name")]
        public string Name { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "Username")]
        public string Username { get; set; }

        public Guid SubjectId { get; set; }

        public bool IsAdministrator { get; set; }

        public bool AdministratorBlocked { get; set; }

        public User Administrator { get; set; }

        public bool HasCoverPictureAlbum { get; set; }

        public Guid WallAlbumId { get; set; }

        public string WallAlbumCoverPicturePath { get; set; }

        public bool IsMember { get; set; }

        public string CurrentUserProfilePicturePath { get; set; }

        public short PagePrivacyType { get; set; }

        public Dictionary<Post, List<Post>> AllPosts { get; set; }

        public User CurrentUser { get; set; }

        public bool MembersCanPost { get; set; }
    }

    public class PageModelCreate
    {
        [Required]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "Username")]
        public string Username { get; set; }

        [Required]
        [Display(Name = "Members can post")]
        public bool MembersCanPost { get; set; }

        [Required]
        [Display(Name = "Privacy type")]
        public string Privacy { get; set; }
    }

    public class PageModelEdit
    {
        [Required]
        [Display(Name = "Name")]
        public string Name { get; set; }


        [Display(Name = "Description")]
        public string Description { get; set; }

        [Required]
        [Display(Name = "Members can post")]
        public bool MembersCanPost { get; set; }

        [Required]
        [Display(Name = "Privacy type")]
        public string Privacy { get; set; }

        public Guid PageId { get; set; }
    }

    public class PageModelDelete
    {
        public Guid Id { get; set; }
    }

    public class SuggestedFans
    {
        public Guid Id { get; set; }
        public string FullName { get; set; }
        public bool Selected { get; set; }
        public string ProfilePicturePath { get; set; }
    }

    public class PageMembersModel : Pageable<SuggestedFans>
    {
        public Guid PageId { get; set; }
        public Guid CurrentUserId { get; set; }
        public SuggestedFans[] Members { get; set; }
    }

    public class InvitePageModel
    {
        public Guid PageId { get; set; }

        public Guid CurrentUserId { get; set; }

        [Required]
        public IEnumerable<Guid> UsersSelected { get; set; }
    }
}